package com.ruoyi.core.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.transaction.domain.Sku;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 会员信息对象 members
 * 
 * @author 亢哲
 * @date 2025-08-07
 */
public class Members extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 会员ID */
    private Long id;

    /** 用户账号 */
    @Excel(name = "用户账号")
    private String username;

    /** 登录密码 */
    @Excel(name = "登录密码")
    private String password;

    /** 支付密码 */
    @Excel(name = "支付密码")
    private String payPassword;

    /** 会员昵称 */
    @Excel(name = "会员昵称")
    private String nickname;

    /** 会员头像 */
    @Excel(name = "会员头像")
    private String avatar;

    /** 性别 */
    @Excel(name = "性别")
    private Long sex;

    /** 会员手机号 */
    @Excel(name = "会员手机号")
    private String phone;

    /** 会员积分 */
    @Excel(name = "会员积分")
    private Long pointsTotal;

    /** 会员类型 */
    @Excel(name = "会员类型")
    private String memberType;

    /** 上次登录 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上次登录", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastLoginAt;

    /** 注册时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 会员地址 */
    private List<ShippingAddresses> shippingAddresses;
    // 必须与ResultMap中的property="shippingAddresses"完全一致

    /** 收藏商品 */
    private List<Sku> skuList;

    //    Sxz, 这是我写的
    // 新增两个关联集合
    private List<PointRecords> pointRecordsList;
    private List<SignIns> signInsList;

    // getters and setters
    public List<PointRecords> getPointRecordsList() {
        return pointRecordsList;
    }
    public void setPointRecordsList(List<PointRecords> pointRecordsList) {
        this.pointRecordsList = pointRecordsList;
    }

    public List<SignIns> getSignInsList() {
        return signInsList;
    }
    public void setSignInsList(List<SignIns> signInsList) {
        this.signInsList = signInsList;
    }

    // 必须要有getter和setter
    public List<ShippingAddresses> getShippingAddresses() {
        return shippingAddresses;
    }
    public void setShippingAddresses(List<ShippingAddresses> shippingAddresses) {
        this.shippingAddresses = shippingAddresses;
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }

    public void setPayPassword(String payPassword) 
    {
        this.payPassword = payPassword;
    }

    public String getPayPassword() 
    {
        return payPassword;
    }

    public void setNickname(String nickname) 
    {
        this.nickname = nickname;
    }

    public String getNickname() 
    {
        return nickname;
    }

    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }

    public void setSex(Long sex) 
    {
        this.sex = sex;
    }

    public Long getSex() 
    {
        return sex;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }

    public void setPointsTotal(Long pointsTotal) 
    {
        this.pointsTotal = pointsTotal;
    }

    public Long getPointsTotal() 
    {
        return pointsTotal;
    }

    public void setMemberType(String memberType) 
    {
        this.memberType = memberType;
    }

    public String getMemberType() 
    {
        return memberType;
    }

    public void setLastLoginAt(Date lastLoginAt) 
    {
        this.lastLoginAt = lastLoginAt;
    }

    public Date getLastLoginAt() 
    {
        return lastLoginAt;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("payPassword", getPayPassword())
            .append("nickname", getNickname())
            .append("avatar", getAvatar())
            .append("sex", getSex())
            .append("phone", getPhone())
            .append("pointsTotal", getPointsTotal())
            .append("memberType", getMemberType())
            .append("lastLoginAt", getLastLoginAt())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
